package com.zxc.judgeservice.innerController;

import com.zxc.judgeservice.service.JudgeService;
import com.zxc.oj.model.entity.QuestionSubmit;
import com.zxc.service.JudgeFeignClient;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RequestMapping("/inner")
@RestController
public class JudgeInnerController implements JudgeFeignClient {
    private final JudgeService judgeService;

    @Override
    @GetMapping("/do")
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId) {
        return judgeService.doJudge(questionSubmitId);
    }
}
